function [ train_X, test_X ] = normalizeTrainTestDataset( train_X, test_X )

[train_X, mu, sigma] = zscore(train_X);
sigma(sigma == 0) = 1;
test_X = bsxfun(@minus, test_X, mu);
test_X = bsxfun(@times, test_X, 1./sigma);

end
